![]() |
NewGestalt |
||||
Header: | Gestalt.h | Carbon status: | Supported | |
Adds a selector code to those already recognized by Gestalt.
OSErr NewGestalt ( OSType selector, SelectorFunctionUPP gestaltFunction );
The selector code you’re adding, which is a four-character sequence of type OSType.
A pointer to the selector function that Gestalt executes when it receives the new selector code.
A result code.
The NewGestalt function registers a specified selector code with the Gestalt Manager so that when the Gestalt function is called with that selector code, the specified selector function is executed.
Before calling NewGestalt, you must define a selector function and install it in the system heap. See SelectorFunctionProcPtr for a description of how to define your selector function.
Registering with the Gestalt Manager is a way for software such as system extensions to make their presence known to potential users of their services.
NewGestalt may move memory and should not be called at interrupt time.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
For compatibility with Mac OS X, you should avoid using the NewGestalt function to add a selector code, which requires moving your selector function into the system heap.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)